<script lang="ts" setup>
import Aside from './home/Aside.vue'
import Header  from "@/views/home/Header.vue";
import {useRouter} from "vue-router";

const router = useRouter();
</script>

<template>
  <!-- 一级容器 -->
  <el-container class="body">
    <!--  头部  -->
    <el-header class="header">
      <Header></Header>
    </el-header>
    <!--  二级容器  -->
    <el-container>
      <!--  侧边栏  -->
      <el-aside class="aside" width="200px" >
        <Aside></Aside>
      </el-aside>
      <!--   三级容器   -->
      <el-container>
      <!--   主页     -->
      <el-main class="main">
        <RouterView/>
      </el-main>
      </el-container>
    </el-container>
  </el-container>
</template>

<style scoped>
/* 解决显示原生侧边滑动栏问题 */
.body{
  height: 100vh;
  overflow: hidden;
}
.header {
  background-color: #3e9aea;
  height: 8vh;
}
.aside{
  height: calc(100vh - 8vh);
  overflow: hidden;
}
.main {
  margin-top: 10px;
  height: 100vh;
}
</style>